package com.modifiertech.lineage.api;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import net.minecraft.util.math.AxisAlignedBB;

/**
 * @description: default
 * @author: saliencemn
 * @mail: hackingmu@outlook.com
 * @date: 2024/8/21 21:47
 */
public class PlayerExecuteSkillCache {
    //key 为 技能名称
    //value 为 技能被触发的时间,>当前时间为有效,-1为未被触发
    private Map<String,Long> executeTimeMap = new ConcurrentHashMap<>();
    //key 为 技能名称
    //value 为 技能允许被执行的时间,毫秒数大于此值可继续执行,若为-1代表没有CD
    private Map<String,Long> executeCdMap = new ConcurrentHashMap<>();
    //key 为 技能名称
    //value 为 技能是否已经第一次经过Tick检查
    private Map<String,Boolean> executeOnceTickCheck = new ConcurrentHashMap<>();
    //key 为技能名称
    //value 为技能是否处于持有状态
    private Map<String,Boolean> skillHolding = new ConcurrentHashMap<String, Boolean>();

    //技能选框是否在合法范围
    private volatile boolean skillRangeAvailable = false;
    //技能选框 对应的 AABB盒列表
    private List<AxisAlignedBB> aabbSkillRangeList = new ArrayList<>();
    
    
    public Map<String, Long> getExecuteTimeMap() {
        return executeTimeMap;
    }
    public void setExecuteTimeMap(Map<String, Long> executeTimeMap) {
        this.executeTimeMap = executeTimeMap;
    }

    public Map<String, Boolean> getExecuteOnceTickCheck() {
        return executeOnceTickCheck;
    }

    public void setExecuteOnceTickCheck(Map<String, Boolean> executeOnceTickCheck) {
        this.executeOnceTickCheck = executeOnceTickCheck;
    }

    public Map<String, Long> getExecuteCdMap() {
        return executeCdMap;
    }

    public void setExecuteCdMap(Map<String, Long> executeCdMap) {
        this.executeCdMap = executeCdMap;
    }
	public Map<String, Boolean> getSkillHolding() {
		return skillHolding;
	}
	public void setSkillHolding(Map<String, Boolean> skillHolding) {
		this.skillHolding = skillHolding;
	}
	public boolean isSkillRangeAvailable() {
		return skillRangeAvailable;
	}
	public void setSkillRangeAvailable(boolean skillRangeAvailable) {
		this.skillRangeAvailable = skillRangeAvailable;
	}
	public List<AxisAlignedBB> getAabbSkillRangeList() {
		return aabbSkillRangeList;
	}
	public void setAabbSkillRangeList(List<AxisAlignedBB> aabbSkillRangeList) {
		this.aabbSkillRangeList = aabbSkillRangeList;
	}
	
    
}
